<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname"
                class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}"
                disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_id" class="form-control " type="text" value="{$row.shop->nickname|htmlentities}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Factory_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-factory_id" class="form-control" type="text" value="{$row.factory->nickname|htmlentities}"
                disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_id" class="form-control" type="text" value="{$row.goods->goods_name|htmlentities}"
                disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_name" class="form-control" name="row[goods_name]" type="text"
                value="{$row.goods_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_fee" min="0" class="form-control" step="0.01" name="row[total_fee]" type="number"
                value="{$row.total_fee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_fee" class="form-control" step="0.01" name="row[goods_fee]" type="number"
                value="{$row.goods_fee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pay_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-pay_fee" min="0" class="form-control" step="0.01" name="row[pay_fee]" type="number"
                value="{$row.pay_fee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Use_credit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-use_credit" class="form-control" name="row[use_credit]" type="number"
                value="{$row.use_credit|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Credit_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-credit_fee" class="form-control" step="0.01" name="row[credit_fee]" type="number"
                value="{$row.credit_fee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Urgent_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-urgent_fee" class="form-control" step="0.01" name="row[urgent_fee]" type="number"
                value="{$row.urgent_fee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money_fee" class="form-control" step="0.01" name="row[money_fee]" type="number"
                value="{$row.money_fee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sn')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sn" class="form-control" name="row[sn]" type="text" value="{$row.sn|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Apply_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-apply_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                data-use-current="true" name="row[apply_time]" type="text" value="{$row.apply_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Send_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-send_fee" class="form-control" step="0.01" name="row[send_fee]" type="number"
                value="{$row.send_fee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Paytime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-paytime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                data-use-current="true" name="row[paytime]" type="text"
                value="{:$row.paytime?datetime($row.paytime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio"
                        value="{$key}" {in name="key" value="$row.status" }checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="shopStatusList" item="vo"}
                <label for="row[shop_status]-{$key}"><input id="row[shop_status]-{$key}" name="row[shop_status]"
                        type="radio" value="{$key}" {in name="key" value="$row.shop_status" }checked{/in} />
                    {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Factory_status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="factoryStatusList" item="vo"}
                <label for="row[factory_status]-{$key}"><input id="row[factory_status]-{$key}"
                        name="row[factory_status]" type="radio" value="{$key}" {in name="key"
                        value="$row.factory_status" }checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Send_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-send_type" class="form-control selectpicker" name="row[send_type]">
                {foreach name="sendTypeList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.send_type" }selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-pay_type" class="form-control selectpicker" name="row[pay_type]">
                {foreach name="payTypeList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.pay_type" }selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Canceltime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-canceltime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                data-use-current="true" name="row[canceltime]" type="text"
                value="{:$row.canceltime?datetime($row.canceltime):''}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remark" class="form-control" name="row[remark]" type="text" value="{$row.remark|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Taketime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-taketime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                data-use-current="true" name="row[taketime]" type="text"
                value="{:$row.taketime?datetime($row.taketime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" class="form-control" name="row[address]" type="text"
                value="{$row.address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Consignee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-consignee" class="form-control" name="row[consignee]" type="text"
                value="{$row.consignee|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-phone" class="form-control" name="row[phone]" type="text" value="{$row.phone|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Discount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-discount" min="0" class="form-control" step="0.01" name="row[discount]" type="number"
                value="{$row.discount|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_urgent')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-is_urgent" class="form-control selectpicker" name="row[is_urgent]">
                {foreach name="isUrgentList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.is_urgent" }selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_f_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-shop_f_image" class="form-control" size="50" name="row[shop_f_image]" type="text"
                    value="{$row.shop_f_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-shop_f_image" class="btn btn-danger faupload"
                            data-input-id="c-shop_f_image"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="false" data-preview-id="p-shop_f_image"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-shop_f_image" class="btn btn-primary fachoose"
                            data-input-id="c-shop_f_image" data-mimetype="image/*" data-multiple="false"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-shop_f_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-shop_f_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_b_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-shop_b_image" class="form-control" size="50" name="row[shop_b_image]" type="text"
                    value="{$row.shop_b_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-shop_b_image" class="btn btn-danger faupload"
                            data-input-id="c-shop_b_image"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="false" data-preview-id="p-shop_b_image"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-shop_b_image" class="btn btn-primary fachoose"
                            data-input-id="c-shop_b_image" data-mimetype="image/*" data-multiple="false"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-shop_b_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-shop_b_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shop_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-shop_images" class="form-control" size="50" name="row[shop_images]" type="text"
                    value="{$row.shop_images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-shop_images" class="btn btn-danger faupload"
                            data-input-id="c-shop_images"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="true" data-preview-id="p-shop_images"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-shop_images" class="btn btn-primary fachoose"
                            data-input-id="c-shop_images" data-mimetype="image/*" data-multiple="true"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-shop_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-shop_images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Factory_f_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-factory_f_image" class="form-control" size="50" name="row[factory_f_image]" type="text"
                    value="{$row.factory_f_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-factory_f_image" class="btn btn-danger faupload"
                            data-input-id="c-factory_f_image"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="false" data-preview-id="p-factory_f_image"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-factory_f_image" class="btn btn-primary fachoose"
                            data-input-id="c-factory_f_image" data-mimetype="image/*" data-multiple="false"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-factory_f_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-factory_f_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Factory_b_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-factory_b_image" class="form-control" size="50" name="row[factory_b_image]" type="text"
                    value="{$row.factory_b_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-factory_b_image" class="btn btn-danger faupload"
                            data-input-id="c-factory_b_image"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="false" data-preview-id="p-factory_b_image"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-factory_b_image" class="btn btn-primary fachoose"
                            data-input-id="c-factory_b_image" data-mimetype="image/*" data-multiple="false"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-factory_b_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-factory_b_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Factory_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-factory_images" class="form-control" size="50" name="row[factory_images]" type="text"
                    value="{$row.factory_images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-factory_images" class="btn btn-danger faupload"
                            data-input-id="c-factory_images"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="true" data-preview-id="p-factory_images"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-factory_images" class="btn btn-primary fachoose"
                            data-input-id="c-factory_images" data-mimetype="image/*" data-multiple="true"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-factory_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-factory_images"></ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Company_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-company_id" class="form-control " type="text" value="{$row.company->nickname}" disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Regional_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-regional_id" class="form-control " type="text" value="{$row.regional->nickname|htmlentities}"
                disabled>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('订单分佣')}:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table table-hover">
                <tbody>
                    <tr>
                        <td style="width: 30%;">来源</td>
                        <td style="width:30%;">姓名</td>
                        <td style="width: 30%;">金额</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    {foreach $giveaway as $v}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>

        <div class="col-xs-12 col-sm-8">
            <table class="table table-hover">
                <tbody>
                    <tr>
                        <td style="width: 30%;">{$v['memo']}</td>
                        <td style="width:30%;">{$v['name']}</td>
                        <td style="width: 30%;">{$v['money']}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    {/foreach}
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>